package com.ctsi.ntedu.repository;

import com.ctsi.ntedu.domain.NteduSchool;
import com.ctsi.ntedu.domain.NteduSchoolExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

/**
 * @author ctsi-biyi-generator
*/
@Mapper
public interface NteduSchoolRepository extends com.ctsi.ssdc.repository.BaseRepository<NteduSchool, Integer, NteduSchoolExample> {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @SelectProvider(type=NteduSchoolSqlProvider.class, method="countByExample")
    long countByExample(NteduSchoolExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @DeleteProvider(type=NteduSchoolSqlProvider.class, method="deleteByExample")
    int deleteByExample(NteduSchoolExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @Delete({
        "delete from ntedu_school",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @Insert({
        "insert into ntedu_school (id, name, ",
        "type, area)",
        "values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, ",
        "#{type,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR})"
    })
    int insert(NteduSchool record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @InsertProvider(type=NteduSchoolSqlProvider.class, method="insertSelective")
    int insertSelective(NteduSchool record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @SelectProvider(type=NteduSchoolSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="area", property="area", jdbcType=JdbcType.VARCHAR)
    })
    List<NteduSchool> selectByExample(NteduSchoolExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @Select({
        "select",
        "id, name, type, area",
        "from ntedu_school",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="area", property="area", jdbcType=JdbcType.VARCHAR)
    })
    NteduSchool selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @UpdateProvider(type=NteduSchoolSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") NteduSchool record, @Param("example") NteduSchoolExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @UpdateProvider(type=NteduSchoolSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") NteduSchool record, @Param("example") NteduSchoolExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @UpdateProvider(type=NteduSchoolSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(NteduSchool record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ntedu_school
     *
     * @mbg.generated Fri Aug 06 10:02:00 CST 2021
     */
    @Update({
        "update ntedu_school",
        "set name = #{name,jdbcType=VARCHAR},",
          "type = #{type,jdbcType=VARCHAR},",
          "area = #{area,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(NteduSchool record);
}